//
//  Mine_Menu_TableViewCell.m
//  Cook Street
//
//  Created by dllo on 15/8/15.
//  Copyright (c) 2015年 LANOU. All rights reserved.
//

#import "Mine_Menu_TableViewCell.h"

@implementation Mine_Menu_TableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.img = [[UIImageView alloc]initWithFrame:CGRectMake(20, 20, (WIDTH - 40) / 3, (WIDTH - 40) / 3)];
        self.img.layer.masksToBounds = YES;
        self.img.layer.cornerRadius = 10;
        [self.contentView addSubview:self.img];
        
        
        
        self.title = [[UILabel alloc]initWithFrame:CGRectMake((WIDTH - 40) / 3 + 40, (WIDTH - 40) / 15, WIDTH - (WIDTH - 40) / 3 - 60, (WIDTH - 40) / 5)];
        self.title.font = [UIFont systemFontOfSize:17];
        [self.contentView addSubview:self.title];
        
        
        self.name = [[UILabel alloc]initWithFrame:CGRectMake((WIDTH - 40) / 3 + 40,  (WIDTH - 40) / 5, (WIDTH - 40) / 2, (WIDTH - 40) / 5)];
        self.name.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.name];
        
    }
    return self;
}



-(void)get:(CookModel *)get
{
    [self.img sd_setImageWithURL:[NSURL URLWithString:get.DBpic]];
    self.title.text = [NSString stringWithFormat:@"菜名:  %@",get.title];
    self.name.text = [NSString stringWithFormat:@"分类:   %@",get.name];

}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
